Optimal. Leaf size=135 \[ \frac {a^3 c^5 (5 B+i A) (1-i \tan (e+f x))^7}{7 f}-\frac {2 a^3 c^5 (2 B+i A) (1-i \tan (e+f x))^6}{3 f}+\frac {4 a^3 c^5 (B+i A) (1-i \tan (e+f x))^5}{5 f}-\frac {a^3 B c^5 (1-i \tan (e+f x))^8}{8 f} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.19, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.049, Rules used = {3588, 77} \[ \frac {a^3 c^5 (5 B+i A) (1-i \tan (e+f x))^7}{7 f}-\frac {2 a^3 c^5 (2 B+i A) (1-i \tan (e+f x))^6}{3 f}+\frac {4 a^3 c^5 (B+i A) (1-i \tan (e+f x))^5}{5 f}-\frac {a^3 B c^5 (1-i \tan (e+f x))^8}{8 f} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 3588
Rubi steps
\begin {align*} \int (a+i a \tan (e+f x))^3 (A+B \tan (e+f x)) (c-i c \tan (e+f x))^5 \, dx &=\frac {(a c) \operatorname {Subst}\left (\int (a+i a x)^2 (A+B x) (c-i c x)^4 \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (4 a^2 (A-i B) (c-i c x)^4-\frac {4 a^2 (A-2 i B) (c-i c x)^5}{c}+\frac {a^2 (A-5 i B) (c-i c x)^6}{c^2}+\frac {i a^2 B (c-i c x)^7}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {4 a^3 (i A+B) c^5 (1-i \tan (e+f x))^5}{5 f}-\frac {2 a^3 (i A+2 B) c^5 (1-i \tan (e+f x))^6}{3 f}+\frac {a^3 (i A+5 B) c^5 (1-i \tan (e+f x))^7}{7 f}-\frac {a^3 B c^5 (1-i \tan (e+f x))^8}{8 f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 10.89, size = 215, normalized size = 1.59 \[ \frac {a^3 c^5 \sec (e) \sec ^8(e+f x) (70 (B-i A) \cos (e+2 f x)+35 (B-4 i A) \cos (e)+154 A \sin (e+2 f x)-70 A \sin (3 e+2 f x)+112 A \sin (3 e+4 f x)+32 A \sin (5 e+6 f x)+4 A \sin (7 e+8 f x)-70 i A \cos (3 e+2 f x)-140 A \sin (e)-14 i B \sin (e+2 f x)-70 i B \sin (3 e+2 f x)+28 i B \sin (3 e+4 f x)+8 i B \sin (5 e+6 f x)+i B \sin (7 e+8 f x)+70 B \cos (3 e+2 f x)-35 i B \sin (e))}{840 f} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.82, size = 185, normalized size = 1.37 \[ \frac {{\left (2688 i \, A + 2688 \, B\right )} a^{3} c^{5} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (3584 i \, A - 896 \, B\right )} a^{3} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (1024 i \, A - 256 \, B\right )} a^{3} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (128 i \, A - 32 \, B\right )} a^{3} c^{5}}{105 \, {\left (f e^{\left (16 i \, f x + 16 i \, e\right )} + 8 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 28 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 56 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 70 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 56 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 28 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 8 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 4.89, size = 242, normalized size = 1.79 \[ \frac {2688 i \, A a^{3} c^{5} e^{\left (6 i \, f x + 6 i \, e\right )} + 2688 \, B a^{3} c^{5} e^{\left (6 i \, f x + 6 i \, e\right )} + 3584 i \, A a^{3} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} - 896 \, B a^{3} c^{5} e^{\left (4 i \, f x + 4 i \, e\right )} + 1024 i \, A a^{3} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} - 256 \, B a^{3} c^{5} e^{\left (2 i \, f x + 2 i \, e\right )} + 128 i \, A a^{3} c^{5} - 32 \, B a^{3} c^{5}}{105 \, {\left (f e^{\left (16 i \, f x + 16 i \, e\right )} + 8 \, f e^{\left (14 i \, f x + 14 i \, e\right )} + 28 \, f e^{\left (12 i \, f x + 12 i \, e\right )} + 56 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 70 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 56 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 28 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 8 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 169, normalized size = 1.25 \[ \frac {c^{5} a^{3} \left (-\frac {2 i B \left (\tan ^{7}\left (f x +e \right )\right )}{7}-\frac {B \left (\tan ^{8}\left (f x +e \right )\right )}{8}-\frac {i A \left (\tan ^{6}\left (f x +e \right )\right )}{3}-\frac {A \left (\tan ^{7}\left (f x +e \right )\right )}{7}-\frac {4 i B \left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {B \left (\tan ^{6}\left (f x +e \right )\right )}{6}-i A \left (\tan ^{4}\left (f x +e \right )\right )-\frac {A \left (\tan ^{5}\left (f x +e \right )\right )}{5}-\frac {2 i B \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{4}\left (f x +e \right )\right )}{4}-i A \left (\tan ^{2}\left (f x +e \right )\right )+\frac {A \left (\tan ^{3}\left (f x +e \right )\right )}{3}+\frac {B \left (\tan ^{2}\left (f x +e \right )\right )}{2}+A \tan \left (f x +e \right )\right )}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.90, size = 167, normalized size = 1.24 \[ -\frac {105 \, B a^{3} c^{5} \tan \left (f x + e\right )^{8} + 120 \, {\left (A + 2 i \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{7} + {\left (280 i \, A + 140 \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{6} + 168 \, {\left (A + 4 i \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{5} + {\left (840 i \, A - 210 \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{4} - 280 \, {\left (A - 2 i \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{3} + {\left (840 i \, A - 420 \, B\right )} a^{3} c^{5} \tan \left (f x + e\right )^{2} - 840 \, A a^{3} c^{5} \tan \left (f x + e\right )}{840 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 8.65, size = 174, normalized size = 1.29 \[ -\frac {\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (-B+A\,2{}\mathrm {i}\right )}{2}+\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (-B+A\,4{}\mathrm {i}\right )}{4}-A\,a^3\,c^5\,\mathrm {tan}\left (e+f\,x\right )-\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (A-B\,2{}\mathrm {i}\right )}{3}+\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (B+A\,2{}\mathrm {i}\right )}{6}+\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (A+B\,4{}\mathrm {i}\right )}{5}+\frac {a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (A+B\,2{}\mathrm {i}\right )}{7}+\frac {B\,a^3\,c^5\,{\mathrm {tan}\left (e+f\,x\right )}^8}{8}}{f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 1.83, size = 323, normalized size = 2.39 \[ \frac {128 A a^{3} c^{5} + 32 i B a^{3} c^{5} + \left (1024 A a^{3} c^{5} e^{2 i e} + 256 i B a^{3} c^{5} e^{2 i e}\right ) e^{2 i f x} + \left (3584 A a^{3} c^{5} e^{4 i e} + 896 i B a^{3} c^{5} e^{4 i e}\right ) e^{4 i f x} + \left (2688 A a^{3} c^{5} e^{6 i e} - 2688 i B a^{3} c^{5} e^{6 i e}\right ) e^{6 i f x}}{- 105 i f e^{16 i e} e^{16 i f x} - 840 i f e^{14 i e} e^{14 i f x} - 2940 i f e^{12 i e} e^{12 i f x} - 5880 i f e^{10 i e} e^{10 i f x} - 7350 i f e^{8 i e} e^{8 i f x} - 5880 i f e^{6 i e} e^{6 i f x} - 2940 i f e^{4 i e} e^{4 i f x} - 840 i f e^{2 i e} e^{2 i f x} - 105 i f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________